import request from '@/utils/request'

export const getLoginApi = (data) => {
  return request.post('/sys/login', data)
}

export const getUserInfoApi = () => {
  return request.get('/sys/profile')
}

export const updatePasswordApi = (data) => {
  return request.put('/sys/user/updatePass', data)
}

export const getQrcodeKeyApi = () => {
  return request.get('/sys/qrcodeKey')
}

/** *
 * 获取扫码状态 多种状态- 1 未扫码 但是加密串未超时 2 已扫码但是未登录 3 已扫码并点登录 4 加密串失效或不存在 5 扫码后用户取消登录
 ***/

export const getQrCodeStateApi = (params) => {
  return request.get('/sys/qrcodeState', { params })
}

export const updateUserStaffPhotoApi = (data) => {
  return request.put('/sys/updateStaffPhoto', data)
}
